package command;

/**
 * @Author: linKe
 * @Date: 2022/1/14 23:16
 * @FileName: TvOffCommand
 * @version: 1.0
 * @Description: 关闭电视命令
 */
public class TVOffCommand implements Command{
    private TV tv;

    public TVOffCommand(TV tv) {
        this.tv = tv;
    }

    @Override
    public void execute() {
        tv.off();
    }

    @Override
    public void undo() {
        tv.on();
    }
}
